<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.xzc.domain.Student" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/14
  Time: 21:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%
        List<Student> stuList = new ArrayList<>();
        for (int i = 1; i < 11; i++) {
            stuList.add(new Student(i, "username" + i, "pass" + i, 18 + i, "phone" + i));
        }
        request.setAttribute("stus",stuList);
    %>
    <c:forEach items="${requestScope.stus}" var="stu" >
        ${stu} <br>
    </c:forEach>

</body>
</html>
